<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function findEle(){
				var d=document.getElementById("d1");
				d.parentNode.align="right";
				//alert(d.nextSibling.nodeType);
				//alert(d.parentNode.childNodes.length);
				alert(d.parentNode.children.length);
				d.nextElementSibling.innerHTML="自助者，天助之";
				d.nextElementSibling.nextElementSibling.innerHTML="We change lives";
			}
		</script>
	</head>
	<body>
		<div>
		<input type="button" value="获得后面的元素" onclick="findEle()"/>
		<div id="d1">111</div>
		<h1>222</h1>
		<h2>333</h2>
		<p>444</p>
		</div>
	</body>
</html>
